package com.itHsuSE.demo2;

public class Work3 {
    public static void main(String[] args) {

    }
}

class Book{
    public int price;
    public String name;
    public Book(String name,int price){
        this.name=name;
        this.price=price;
    }
    public void updatePrice(Book book){
        if(book.price>150){
            book.price=150;
        }else if(book.price>100){
            book.price=100;
        }
    }
}
